笔趣阁[书].js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. var rule = {
  2. 类型: '小说',//影视|听书|漫画|小说
  3. title: '笔趣阁[书]',
  4. host: 'https://www.bqka.cc',
  5. url: '/json?sortid=fyclass&page=fypage',
  6. class_name: '玄幻&武侠&都市&历史&网游&科幻&女生&完本',
  7. class_url: '1&2&3&4&5&6&7&0',
  8. searchUrl: '/user/search.html?q=**',
  9. searchable: 2,
  10. quickSearch: 0,
  11. filterable: 1,
  12. filter: '',
  13. filter_url: '',
  14. filter_def: {},
  15. headers: {
  16. 'User-Agent': 'PC_UA',
  17. },
  18. timeout: 5000,
  19. cate_exclude: '',
  20. play_parse: true,
  21. // 图片替换:$js.toString(() => {log(input);input = getProxyUrl()+ '&url='+input+'&type=img';}),
  22. lazy: $js.toString(() => {
  23. let html = request(input);
  24. let title = pdfh(html, '.content&&h1&&Text');
  25. // let content = pdfh(html, '#chaptercontent&&Html').replace(/<br>/g, '\n').replace(/\n\n/g, '\n');
  26. let content = pdfh(html, '#chaptercontent&&Html').replace(/\n/g, "").split("<br>").filter(v => v).slice(0, -2).join("\n");
  27. let ret = JSON.stringify({
  28. title,
  29. content
  30. });
  31. input = {parse: 0, url: 'novel://' + ret, js: ''};
  32. }),
  33. double: false,
  34. 推荐: 'ul:gt(0)&&li;a&&Text;;span:eq(-1)&&Text;a&&href',
  35. 一级: $js.toString(() => {
  36. //let cookie = getItem(RULE_CK, '');
  37. //let cookie = '';
  38. //let html = request(input,{headers:{Cookie:cookie}});
  39. let html = request(input);
  40. let json = JSON.parse(html);
  41. let d = [];
  42. json.forEach(it => {
  43. d.push({
  44. title: it.articlename,
  45. desc: it.author,
  46. img: it.url_img,
  47. url: it.url_list,
  48. content: it.intro,
  49. })
  50. });
  51. setResult(d);
  52. }),
  53. 二级: {
  54. title: 'h1&&Text',
  55. img: '.cover&&img&&src',
  56. desc: 'span.last:eq(-1)&&Text;span.last&&Text;;;.small&&span&&Text',
  57. content: '.intro&&dd&&Text',
  58. tabs: '.rl',
  59. lists: '.listmain&&dd:not(.more)&&a',
  60. tab_text: 'body&&Text',
  61. list_text: 'body&&Text',
  62. list_url: 'a&&href',
  63. list_url_prefix: '',
  64. },
  65. 搜索: $js.toString(() => {
  66. //let cookie = getItem(RULE_CK, '');
  67. //log('储存的cookie:' + cookie);
  68. let cookie = '';
  69. if (!cookie) {
  70. let {cookie, html} = reqCookie('https://www.bqka.cc/user/hm.html?q=' + KEY, {}, true
  71. );
  72. log(cookie);
  73. //setItem(RULE_CK, cookie);
  74. }
  75. eval(rule.一级.replace('js:', ''));
  76. }),
  77. }